package com.open.sample.presenter;

import com.open.leanback.widget.ListRowPresenter;
import com.open.leanback.widget.Presenter;
import com.open.leanback.widget.PresenterSelector;

/**
 * 多个选择器.
 */
public class NewPresenterSelector extends PresenterSelector {
    private ListRowPresenter mListRowPresenter = new ListRowPresenter();
    private NewListRowPresenter mShadowDisabledRowPresenter = new NewListRowPresenter();

    public NewPresenterSelector() {

        mShadowDisabledRowPresenter.setNumRows(1);
        mShadowDisabledRowPresenter.setHeaderPresenter(new HeaderPresenter());
    }

    @Override
    public Presenter getPresenter(Object item) {
        return mShadowDisabledRowPresenter;
    }

    @Override
    public Presenter[] getPresenters() {
        return new Presenter[]{
                mShadowDisabledRowPresenter,
                mListRowPresenter

        };
    }
}
